package com.mt.api.modules.manager.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mt.api.modules.domain.StockTakingDetail;
import com.mt.api.modules.manager.IStockTakingDetailManager;
import com.mt.api.modules.mapper.StockTakingDetailMapper;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: plover
 * @Date: 2022-04-30
 * @Description:
 */
@Component
public class StockTakingDetailManagerImpl extends ServiceImpl<StockTakingDetailMapper, StockTakingDetail> implements IStockTakingDetailManager {


    @Override
    public List<StockTakingDetail> getListByStockTakingId(Integer stockTakingId) {
        LambdaQueryWrapper<StockTakingDetail> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(StockTakingDetail::getStockTakingId, stockTakingId);
        return baseMapper.selectList(wrapper);
    }
}
